<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>BatteryCharger: LCD.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">BatteryCharger
   &#160;<span id="projectnumber">5.0</span>
   </div>
   <div id="projectbrief">A smart charger for lead-acid batteries.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_l_c_d_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">LCD.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_l_c_d_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef _LCD_H</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define _LCD_H</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">// Number of rows and columns in the display, starting from 0</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#ad5a8dfc9e1a303abf98b2705f3581afb">   29</a></span>&#160;<span class="preprocessor">#define MAX_ROW 1</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a97e80440b5a5ec2ffc172dead9f8d2ec">   30</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MAX_COL 15</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a374568ef1f03c0d797c05f38df9524c1">   32</a></span>&#160;<span class="preprocessor">#define LCD_DATA_Pos   6</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a077def6ebb43bf9aee4e7cad468ed726">   33</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_DATA_PORT  LPC_GPIO0</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a6802227eba99bac53f2f8b870b8ae92c">   34</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_CTRL_Pos   1</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a10f66499a3b1e8388d4f380e784d2149">   35</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_CTRL_PORT  LPC_GPIO0</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment">// Approximate clock period, nanoseconds</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a6cc87b846df74bb6c3c689c4aa0fc134">   38</a></span>&#160;<span class="preprocessor">#define CLKPER          20   // LPC1114 runs at 48 MHz</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">// For Sparkfun 3.3V display, ADM1602K</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#aa2af7a74aded83d980db7fc1565e10dc">   53</a></span>&#160;<span class="preprocessor">#define LCD_TAS        100   // RS, R/W setup before EN rises</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#addad11bfc5768ef6954ce6f742bfc52c">   54</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_TDS         60   // DATA setup before EN falls</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a23c2b5376d9dd99c1bd81aadf40ba886">   55</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_TDA         60   // DATA valid after EN rises (reading)</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#ae067a8cdd1dba337ed41a6e8ab8463f7">   56</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_TEH        300   // EN minimum high time</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="_l_c_d_8h.html#a5bbfdad6587a1ab45b7b28995d9f727b">   57</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define LCD_TEL        200   // EN minimum low time</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="_l_c_d_8h.html#aa13521c0d3d0aaf1cf72b627ab92d9eb">TopLine</a>[<a class="code" href="_l_c_d_8h.html#a97e80440b5a5ec2ffc172dead9f8d2ec">MAX_COL</a>+1];</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">char</span> <a class="code" href="_l_c_d_8h.html#a275ec8b93c7971a82588ca196dc30070">BottomLine</a>[<a class="code" href="_l_c_d_8h.html#a97e80440b5a5ec2ffc172dead9f8d2ec">MAX_COL</a>+1];</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment">// Initializes the display, should be called just once</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keywordtype">void</span> <a class="code" href="_l_c_d_8h.html#aa53c9d40f3aa552a9974cd55ac510cb3">LCD_Init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment">// Display the next character, using Row and Col to point to the current</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment">// character position. TopLine and BottomLine contain the text to be displayed.</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="keywordtype">void</span> <a class="code" href="_l_c_d_8h.html#a2dc2984727b84f491d76b236fd8b640a">LCD_WriteNextChar</a>();</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="_l_c_d_8h_html_a275ec8b93c7971a82588ca196dc30070"><div class="ttname"><a href="_l_c_d_8h.html#a275ec8b93c7971a82588ca196dc30070">BottomLine</a></div><div class="ttdeci">char BottomLine[MAX_COL+1]</div><div class="ttdoc">Character string that is written to row 1 of the LCD display. </div><div class="ttdef"><b>Definition:</b> LCD4.c:34</div></div>
<div class="ttc" id="_l_c_d_8h_html_a97e80440b5a5ec2ffc172dead9f8d2ec"><div class="ttname"><a href="_l_c_d_8h.html#a97e80440b5a5ec2ffc172dead9f8d2ec">MAX_COL</a></div><div class="ttdeci">#define MAX_COL</div><div class="ttdef"><b>Definition:</b> LCD.h:30</div></div>
<div class="ttc" id="_l_c_d_8h_html_aa53c9d40f3aa552a9974cd55ac510cb3"><div class="ttname"><a href="_l_c_d_8h.html#aa53c9d40f3aa552a9974cd55ac510cb3">LCD_Init</a></div><div class="ttdeci">void LCD_Init(void)</div><div class="ttdoc">Initialize the LCD display. </div><div class="ttdef"><b>Definition:</b> LCD4.c:269</div></div>
<div class="ttc" id="_l_c_d_8h_html_a2dc2984727b84f491d76b236fd8b640a"><div class="ttname"><a href="_l_c_d_8h.html#a2dc2984727b84f491d76b236fd8b640a">LCD_WriteNextChar</a></div><div class="ttdeci">void LCD_WriteNextChar()</div><div class="ttdoc">Writes the next character to the LCD. </div><div class="ttdef"><b>Definition:</b> LCD4.c:218</div></div>
<div class="ttc" id="_l_c_d_8h_html_aa13521c0d3d0aaf1cf72b627ab92d9eb"><div class="ttname"><a href="_l_c_d_8h.html#aa13521c0d3d0aaf1cf72b627ab92d9eb">TopLine</a></div><div class="ttdeci">char TopLine[MAX_COL+1]</div><div class="ttdoc">Character string that is written to row 0 of the LCD display. </div><div class="ttdef"><b>Definition:</b> LCD4.c:33</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bfccd401955b95cf8c75461437045ac0.html">inc</a></li><li class="navelem"><a class="el" href="_l_c_d_8h.html">LCD.h</a></li>
    <li class="footer">Generated on Mon Jan 13 2014 08:36:57 for BatteryCharger by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
